package Jets.skin
{
	import flash.display.Bitmap;
	import flash.utils.getDefinitionByName;

	public class AssetSkin
	{
		static public const NomalSkinType:int = 0;
		static public const Scale9SkinType:int = 1;
		
		static public var skinPack:String = "skin.Skin1";
		static public var skinType:int = Scale9SkinType;
		static private const g_skinLabel:String = "S_Label";
		static private const g_skinInput:String = "S_Input";
		
		static public function get skinLabel():Bitmap
		{
			return getClassInstace(g_skinLabel) as Bitmap;
		}
		
		static public function get skinInput():Bitmap
		{
			return getClassInstace(g_skinInput) as Bitmap;
		}
		
		static private function getClassInstace(clsName:String):*
		{
			var cls:Class = getDefinitionByName(skinPack +"."+ clsName) as Class;
			if(cls)
			{
				return new cls();
			}
			return null;
		}
	}
}